<template>
  <div>
    <Button size="small" type="info" @click="findAppealFlow">查看诉求处理进度</Button>
    <Modal
      v-model="modal"
      title="处理进度">
      <template>
        <Steps :current="flowList.length-1" direction="vertical">
          <Step v-for="(item,index) in flowList" :key="index">
            <template slot="title">
              <!--            <div v-if="index === flowList.length - 1">进行中</div>-->
              <div>已完成</div>
            </template>
            <template slot="content">
              {{ item.suqiu_describe }}
              <div v-if="item.suqiu_flow_describe">描述：{{ item.suqiu_flow_describe }}</div>
              <div>From:{{ item.from_login_name }} ---> To:{{ item.to_login_name }}</div>
            </template>
          </Step>
          <!--        <Step title="已完成" content="这里是该步骤的描述信息"></Step>-->
          <!--        <Step title="进行中" content="这里是该步骤的描述信息"></Step>-->
          <!--        <Step title="待进行" content="这里是该步骤的描述信息"></Step>-->
        </Steps>
      </template>
    </Modal>
  </div>
</template>

<script>
import { findAppealFlowList } from '../../../api/ywtbappeal'

export default {
  name: 'index',
  props: {
    row: Object
  },
  data () {
    return {
      modal: false,
      flowList: []
    }
  },
  methods: {
    findAppealFlow () {
      let data = {
        suqiu_code: this.row.suqiu_code
      }
      findAppealFlowList(data).then(ret => {
        if (ret.data.errcode === 0) {
          this.flowList = ret.data.data
          this.modal = true
        } else {
          this.$Notice.error({ title: '查询失败', desc: ret.data.errmsg })
        }
      })
    }
  }
}
</script>

<style scoped>

</style>
